<body class="inside-header inside-aside is-dialog">
<div id="main" role="main">
  <div class="tab-content tab-addtabs">
    <div id="content">
      <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
          <section class="content-header hide">
            <h1>
              控制台 <small>Control panel</small>
            </h1>
          </section>
          <div class="content">
            <form id="add-form" class="form-horizontal nice-validator n-default n-bootstrap" role="form" data-toggle="validator" method="POST" action novalidate="novalidate">

              <div class="form-group">
                <label for="c-sort" class="control-label col-xs-12 col-sm-2">排序:</label>
                <div class="col-xs-12 col-sm-8">
                  <input id="c-sort" class="form-control" name="row[sort]" type="number" value="<?=$row['sort']?>" placeholder="可为空">
                </div>
              </div>

              <div class="form-group">
                <label for="cate_id" class="control-label col-xs-12 col-sm-2">栏目:</label>
                <div class="col-xs-12 col-sm-8">
                  <select class="form-control" required="true" name="row[cate_id]">
                    <!-- <option value="0" selected="selected">请选择</option> -->
                    <?php foreach($cate as $v):?>
                    <option value="<?=$v['id']?>" <?php if($v['id'] == $row['cate_id']):?>selected<?php endif;?>>
                    <?=$v['title']?>
                    </option>
                    <?php foreach($v['children'] as $c):?>
                    <?php if(!empty($c['title']) && !empty($c['tpl_list'])):?>
                    <option value="<?=$c['id']?>" <?php if($c['id'] == $row['cate_id']):?>selected<?php endif;?>>
                    &nbsp;&nbsp;|--
                    <?=$c['title']?>
                    </option>
                    <?php endif;?>
                    <?php foreach($c['children'] as $a):?>
                    <?php if(!empty($a['title'])):?>
                    <option value="<?=$a['id']?>" <?php if($a['id'] == $row['cate_id']):?>selected<?php endif;?>>
                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;|--
                    <?=$a['title']?>
                    </option>
                    <?php endif;?>
                    <?php endforeach;?>
                    <?php endforeach;?>
                    <?php endforeach;?>
                  </select>
                </div>
              </div>

              <div class="form-group">
                <label for="c-tags" class="control-label col-xs-12 col-sm-2">标签:</label>
                <div class="col-xs-12 col-sm-8">
                  <input id="c-tags" class="form-control" name="row[name]" type="text" value="<?=$row['name']?>" placeholder="多个用英文逗号隔开">
                </div>
              </div>

              <div class="form-group layer-footer">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                  <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
                  <button type="reset" class="btn btn-default btn-embossed">重置</button>
                  <button type="button" class="btn btn-primary btn-embossed preview">预览</button>
                </div>
              </div>
            </form>
          </div>

          <div id="preview-body">

          </div>

        </div>
      </div>
    </div>
  </div>
</div>
</body>